﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SalesCore.Extensions
{
    public static class StringExtensions
    {
        /// <summary>
        /// Adds the specified System.String values to the beginning of this System.String.
        /// </summary>
        /// <param name="s"></param>
        /// <param name="values"></param>
        /// <returns></returns>
        public static string Prepend(this string s, params string[] values)
        {
            var items = new string[values.Length + 1];
            values.CopyTo(items, 0);
            items[items.Length - 1] = s;
            return string.Concat(items);
        }

        /// <summary>
        /// Adds a pair of single quotes to the specified System.String.
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        public static string AddSingleQuotes(this string s)
        {
            return string.Concat("'", s, "'");
        }
    }
}
